<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/content.min.js?v=1.0.0"></script>
<script src="/js/plugins/iCheck/icheck.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>
<script>
	$(document).ready(function() {
		$(".i-checks").iCheck({
			checkboxClass : "icheckbox_square-green",
			radioClass : "iradio_square-green",
		})
	});
	
	$(function(){
		$(".delete").click(function(){
			var that=$(this);
			$.ajax({
				url:"/user/delete?id="+that.closest("td").prev().find("input").val(),
				dataTpe:"json",
				success:function(f){
					if(f == "true"){
						parent.layer.alert("删除成功");
						that.closest("tr").remove();
					}else{
						parent.layer.alert("删除失败!")
					}
				},
				error:function(data){
					if(data.status == 401){
						parent.layer.alert("没有权限操作")
					}
				}
			})
			return false;
		})
	})
</script>
</body>
</html>
